package Submarine;

import javax.swing.*;
import java.awt.*;
import java.util.Random;

/** 水雷 */
public class Mine extends SeaObject implements EnemyLife{
    public Mine(int x ,int y){
        super(x,y,4.0,11,11);
    }

    @Override
    public void move() {
        y-=speed;
    }

    public ImageIcon getImage(){
        return Images.mine;
    }

    public boolean isOutofBounds(){return y<139;}

    public int getLife(){return 1;}
}
/**
 * 案例练习
 * int grade;
 * int class;
 * int age;
 * String name;
 * void student(int age,String name){
 *     grade = 1;
 *     class = 5;
 *     this.age = age;
 *     this.name = "jack";
 * }
 */





















